<template>
    <div>
        <am-white-space></am-white-space>
        <am-wing-blank size="sm">
            <yx-province type="area" v-model="value"></yx-province>
            <am-button @click="getValueClicked">获取值</am-button>
        </am-wing-blank>
        <am-white-space></am-white-space>
        <am-wing-blank>
            <am-button @click="changeValue">切换值</am-button>
        </am-wing-blank>
    </div>
</template>

<script>
    import AmWingBlank from "../../../weex-amui/packages/am-wing-blank/index";
    import YxProvince from "../../../components/yx-province/index";
    import AmButton from "../../../weex-amui/packages/am-button/index";
    import AmWhiteSpace from "../../../weex-amui/packages/am-white-space/index";
    export default {
        name: "province-demo",
        components: {AmWhiteSpace, AmButton, YxProvince, AmWingBlank},
        data (){
            return {
                value: [5,39,881]
            }
        },
        methods: {
            getValueClicked (){
                this.$notice.toast({
                    message: JSON.stringify(this.value)
                })
            },

            changeValue (){
                this.value = [5,36,843]
            }
        }
    }
</script>

<style scoped>

</style>
